Release 10.1A: OpenEdge Deployment:
Managing 4GL Applications
Memory-mapped r-code execution environment
At run time, OpenEdge manages the execution of memory-mapped r-code procedures using the following components:
- Shared memory buffer — The portion of shared memory that the operating system allocates and uses to store r-code segments for procedures in a memory-mapped procedure library.
- Segment descriptor table — An in-memory table that references the r-code segments required by all executing procedures, including the location of each r-code segment in memory and usage count information.
- R-code directory — An in-memory table that contains information about each executing r-code procedure, including r-code size, usage count, segment descriptions, and a reference to the segment descriptor table for each segment.
OpenEdge uses the segment descriptor table and the r-code directory to manage r-code procedures from operating system files, standard libraries, and memory-mapped libraries.
Figure B–3 shows the layout for the memory-mapped r-code execution environment.
Figure B–3: Memory-mapped r-code execution environment
![]()
In Figure B–3, OpenEdge located the
cust.randorders.rfiles in a memory-mapped library. Note that all r-code segments in a memory-mapped library are located in shared memory. When OpenEdge needs a segment, it executes the segment directly from shared memory.Memory-mapped execution sequence
When you run a memory-mapped r-code procedure for the first time, OpenEdge loads and executes the procedure as follows:
- Opens the procedure library, if not already open, and memory-maps the library in shared memory.
- Reads the r-code procedure and creates an r-code directory entry for the procedure.
- Registers each required r-code segment in the execution environment as follows:
- Once the required r-code segments in the procedure are registered in the execution environment, the interpreter begins executing the r-code procedure at the start of the first main action code segment and accesses the remaining segments directly from shared memory as required.
Memory-mapped execution environment limits
The number of memory-mapped r-code procedures that you can run at one time and the shared memory used are determined by the following factors:
- R-code directory size — The default is 100 entries, the minimum is 5 entries, and the maximum is 500. You can set the initial number of entries using the Directory Size (
-D) startup parameter. OpenEdge dynamically increases the directory size up to the maximum, as required. Use the Hardlimit (-hardlimit) startup parameter to force OpenEdge to adhere to the limit specified by the Directory Size (-D) startup parameter.- Available memory — The number of memory-mapped r-code libraries you can have open is limited by the amount of shared memory available on the system.
Memory-mapped r-code segment management
When OpenEdge needs a memory-mapped r-code segment, it executes the segment directly from shared memory. OpenEdge does not store active memory-mapped r-code segments in the execution buffer. Nor does it swap non-active segments to the session sort file. OpenEdge relies on the operating system to manage the swapping of r-code segments in and out of shared memory.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |